\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f3\b0\i0\ul0\fs24 open openfile application icon shell script\
\
Q: Is it possible to start up a NextStep program from the command line (e.g. from Shell or Terminal) AND still have it show the nice icon associated with that application, instead of the generic "executable" icon?\
\
A: The
\b open
\b0 command “opens a file (or a directory), just as if you had double-clicked the icon” (from the
\b open
\b0 man page). The open command also starts a NextStep application as if someone had clicked on it in the Directory Browser. For example, in the Shell, type\
\
\f1 open /NextDeveloper/Demos/SoundPlayer
\f3 \
\
SoundPlayer will start running and its appIcon window will have the SoundPlayer icon instead of the generic one.\
\
Q: How can I open a shell script easily in Edit? It has the executable icon in the Browser, so double-clicking its icon or using
\b open
\b0 won't do the right thing. Since I'm already
\b cd
\b0 'ed to the appropriate directory in Shell, I don't want to bother using Edit's Open panel.\
\
A: If Edit is running, the
\b openfile
\b0 command will allow you to open a file in Edit even if it's executable, without launching a new copy of Edit. See the man page. \
\
If Edit is not already running, you can simply launch it instead of using
\b openfile
\b0 :\
\f1 Edit filename &
\f3 \
This too will work whether or not the file is executable.\